-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refine PoX-4 stateful testing environment and address comments #4597
Refine PoX-4 stateful testing environment and address comments #4597
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feat/pox-4-stateful-property-testing #4597 +/- ##
========================================================================
- Coverage 83.33% 83.09% -0.25%
========================================================================
Files 470 470
Lines 332151 332151
Branches 317 317
========================================================================
- Hits 276799 276000 -799
- Misses 55344 56143 +799
Partials 8 8 see 33 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I left a few notes that should be easy to address.
@@ -90,7 +90,8 @@ export class DelegateStackStxCommand implements PoxCommand { | |||
stackerWallet.delegatedMaxAmount >= Number(this.amountUstx) && | |||
Number(this.amountUstx) <= stackerWallet.ustxBalance && | |||
Number(this.amountUstx) >= model.stackingMinimum && | |||
operatorWallet.hasPoolMembers.includes(stackerWallet.stxAddress) && | |||
operatorWallet.poolMembers.length > 0 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If length is 0 what happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It means no delegator
has delegated the operator
, so the command should fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remove this and set numRuns
to 100
nothing fails though.
contrib/core-contract-tests/tests/pox-4/pox_RevokeDelegateStxCommand.ts
Outdated
Show resolved
Hide resolved
contrib/core-contract-tests/tests/pox-4/pox_CheckBalanceCommand.ts
Outdated
Show resolved
Hide resolved
Thanks to @hugocaillard for swiftly implementing this feature.
Co-authored-by: Nikos Baxevanis <nikos.baxevanis@gmail.com>
Removed the "./noopReporter.ts" from the global Vitest reporters configuration to ensure test outputs are visible by default. This change addresses an issue where the output from all tests was being hidden, making it difficult to observe test results directly. The noopReporter can still be used selectively for specific tests via: npx vitest --reporter=./noopReporter.ts run tests/pox-4/pox-4.stateful-prop.test.ts
Each `run` method now calls `model.trackCommandRun(this.constructor.name)`, enhancing observability and aiding in debugging by systematically tracking command executions. Example output: Command run method execution counts: AllowContractCallerCommand: 491 DelegateStackStxCommand: 1 DelegateStxCommand: 285 GetStackingMinimumCommand: 536 GetStxAccountCommand: 503 RevokeDelegateStxCommand: 281 StackStxCommand: 8
24d4560
to
beb9a04
Compare
Merging into |
990512d
into
feat/pox-4-stateful-property-testing
This PR refines the PoX-4 stateful property testing environment and addresses all the comments. It is part of #4548 and targets feat/pox-4-stateful-property-testing (#4550).